<?php
class main extends base{

	public function init(){
		parent::init();

		$this->tit = '首页';

		$this->siteObj = D('site');
	}

	public function index()
	{
		$cond = "status=1 ".$this->cond_base;
		// $this->data = $this->siteObj->getHomeData($cond);
		$data = [
            'widget-card' => [
				// 商品总量
                'goods_total' => 0,
                // 用户总量
                'user_total' => 0,
                // 订单总量
                'order_total' => 0,
                // 评价总量
                'comment_total' => 0
            ],
            'widget-outline' => [
                // 销售额(元)
                'order_total_price' => [
                    'tday' => 0,
                    'ytd' => 0
                ],
                // 支付订单数
                'order_total' => [
                    'tday' => 0,
                    'ytd' => 0
                ],
                // 新增用户数
                'new_user_total' => [
                    'tday' => 0,
                    'ytd' => 0
                ],
                // 下单用户数
                'order_user_total' => [
                    'tday' => 0,
                    'ytd' => 0
                ]
            ],
            'widget-echarts' => [
                // 最近七天日期
                'date' => [],
                'order_total' => [],
                'order_total_price' =>[],
            ]
		];
		$this->data = $data;
	}

}